<template>
	<view class="container">
		<view class="content">
			<view class="content-search d-rn d-ac">
				<image src="../../static/img/search.png" mode=""></image>
				<input type="text" :placeholder="$t('search_placeholder')" placeholder-style="#CCCCCC">
			</view>
		</view>
		<view class="tong">
			<view class="tong-title">
				<text>{{ $t('company_contacts') }}</text>
			</view>
		</view>
		
		<view class="list">
			<view class="list-one" v-for="(item,index) in numberList" :key="index" @click.stop="handleShowNum(item,index)">
				<view class="list-one-one">
					<view class="list-one-one-wai d-rn d-ac d-jb">
						<view class="list-one-one-wai-left d-rn d-ac">
							<image :src="item.icon || '../../static/img/jiegoutu.png'" mode=""></image>
							<view class="list-one-one-wai-left-right d-cn">
								<text>{{item.name}}</text>
								<text>{{item.zhjiwu || ''}}</text>
							</view>
						</view>
						<view class="list-one-one-wai-right d-rn d-ac">
							<text v-if="item.zhjiwu">{{ $t('creator') }}</text>
						</view>
					</view>
					
					<view class="list-one-one-nei" v-if="item.chooseSts">
						<view class="list-one-one-nei-list d-rn d-ac" v-for="(items,indexs) in item.children" :key="indexs" >
							<view class="list-one-one-nei-list-left" @click.stop="handleChooseNum(items,indexs)">
								<image :src="items.changeSelect?'../../static/img/comfirm.png':'../../static/img/notConfirm.png'" mode=""></image>
							</view>
							<view class="list-one-one-nei-list-min d-cn">
								<text>{{items.name}}</text>
								<text>{{items.zhjiwu || ''}}</text>
							</view>
						</view>
					</view>
					
				</view>
			</view>
		</view>



	</view>
</template>

<script>
	var _self
	export default {
		data() {
			return {
				
				numberList:[
					{
						icon:'../../static/img/data.png',
						name:'杨波',
						zhjiwu:'总经理'
					},
					{
						name:'管理部',
						chooseSts:false,
						children:[
							{
								icon:'../../static/img/data.png',
								name:'杨波',
								zhjiwu:'总经理',
								changeSelect:false,
							}
						]
					},
					{
						name:'技术部',
						chooseSts:false,
						children:[
							{
								icon:'../../static/img/data.png',
								name:'杨波',
								zhjiwu:'总经理',
								changeSelect:false,
							},
							{
								icon:'../../static/img/data.png',
								name:'杨波',
								zhjiwu:'总经理',
								changeSelect:false,
							}
						]
					},
					{
						name:'销售部',
						chooseSts:false,
						children:[
							{
								icon:'../../static/img/data.png',
								name:'杨波',
								zhjiwu:'总经理',
								changeSelect:false,
							}
						]
					}
				]
				
			}
		},
		onLoad() {
			_self = this;
		},
		methods: {
			handleShowNum(item,index){
				item.chooseSts = !item.chooseSts
			},
			handleChooseNum(items,indexs){
				items.changeSelect = !items.changeSelect
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f5f5f5;
	}

	.container {
		width: 100%;

		.content {
			width: 100%;

			&-search {
				width: 94%;
				padding: 20rpx 35rpx;
				box-sizing: border-box;
				margin: 26rpx auto;
				border-radius: 2em;
				background-color: #ffffff;

				image {
					width: 32rpx;
					height: 32rpx;
				}

				input {
					font-size: 26rpx;
					color: #cccccc;
				}
			}
		}
		
		.tong{
			width: 100%;
			padding: 24rpx;
			box-sizing: border-box;
			text{
				font-size: 26rpx;
				color: #666666;
			}
		}
		.list{
			width: 100%;
			padding: 24rpx;
			box-sizing: border-box;
			background-color: #ffffff;
			&-one{
				padding-bottom: 24rpx;
				box-sizing: border-box;
				border-bottom: 1px solid #eeeeee;
				&-one{
					margin-top: 20rpx;
					&-wai{
						&-left{
							image{
								width: 80rpx;
								height: 80rpx;
								margin-right: 24rpx;
							}
							&-right{
								text:nth-of-type(1){
									font-size: 28rpx;
									font-weight: 500;
									color: #333333;
								}
								text:nth-of-type(2){
									font-size: 28rpx;
									font-weight: 500;
									color: #999999;
									margin-top: 10rpx;
								}
							}
						}
						&-right{
							text{
								font-size: 28rpx;
								color: #999999;
							}
						}
					}
					&-nei{
						width: 90%;
						margin: 20rpx auto;
						&-list{
							border-top:1px solid #f5f5f5 ;
							padding-top: 20rpx;
							box-sizing: border-box;
							margin-bottom: 20rpx;
							&-left{
								margin-right: 30rpx;
								image{
									width: 32rpx;
									height: 32rpx;
								}
								
							}
							&-min{
								text:nth-of-type(1){
									font-size: 30rpx;
									color: #333333;
								}
								text:nth-of-type(2){
									font-size: 24rpx;
									color: #999999;
								}
							}
						}
					}
				
				}
			}
		}
		
		

	}
</style>